package com.example.mytests;

import com.example.mytests.config.MyList;
import com.example.mytests.config.MyUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class MyTestsApplication implements CommandLineRunner {

    @Autowired
    MyList myList;

    public static void main(String[] args) {
        System.out.println("start...............");
        SpringApplication.run(MyTestsApplication.class, args);
        System.out.println("end...............");
    }

    @Override
    public void run(String... args) throws Exception {
        System.out.println("run...............");
        for (MyUser myUser : myList.getMyUsers()) {
            System.out.println(myUser);
        }
    }
}
